package com.an.blog.web.controller;

import cn.dev33.satoken.annotation.SaIgnore;
import com.an.blog.service.IBlogTagService;
import com.an.blog.web.domain.vo.BlogTagWebVo;
import com.an.common.core.domain.R;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 博客标签网络控制器
 *
 * @author: Ann
 * @createDate: 2023/05/18 18:42:35
 * @version: 1.0.0
 */
@RequiredArgsConstructor
@RestController
@RequestMapping("/blog-web/tag")
@SaIgnore
public class BlogTagWebController {

    private final IBlogTagService blogTagService;


    /**
     * 查询标记列表
     *
     * @return {@link R }<{@link List }<{@link BlogTagWebVo }>>
     * @author: Ann
     * @createDate: 2023/05/18 18:52:02
     * @version: 1.0.0
     */
    @GetMapping("/list")
    public R<List<BlogTagWebVo>> queryTagWebList() {
        List<BlogTagWebVo> tagWebVos = blogTagService.queryIdAndNameList();
        return R.ok(tagWebVos);
    }

}
